package com.jason.bbs.bean.user;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import lombok.Data;

@Data
@Entity(name="user_info")
@Table(name = "user_info", indexes = { @Index(columnList = "account,password"), @Index(columnList = "email") })
public class UserInfo implements Serializable {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@Column(name = "user_name", length = 30, nullable = false)
	private String userName;
	@Column(name = "nick_name", length = 30, nullable = false)
	private String nickName;
	@Column(length = 50, unique = false)
	private String email;
	@Column(length = 20, nullable = false, unique = true)
	private String account;
	@Column(length = 32, nullable = false)
	private String password;
	@Column(name = "create_time", nullable = false,columnDefinition=" datetime ")
	private Timestamp createTime;
	@Column(name = "last_login_time",columnDefinition=" datetime ")
	private Timestamp lastLoginTime;
	@Column(length = 2, nullable = false)
	private Integer status;
}
